package ee.difference.principal;


public class Difference<D extends DiffEntry<D>> {

	D leftEntry;
	D rightEntry;
	boolean difference;

	public Difference(D _leftEntry, D _rightEntry) {
		
		// 両方がNullの場合は受け付けない
		if(_rightEntry == null && _leftEntry == null){
			throw new InvalidEntryException();
		}
		
		this.leftEntry = _leftEntry;
		this.rightEntry = _rightEntry;
		
	}

	public boolean isDefference(){
		return difference;
	}
	
	protected void setDefference(boolean val){
		this.difference = val;
	}

	/**
	 * @return the leftEntry
	 */
	public D getLeftEntry() {
		return leftEntry;
	}

	/**
	 * @param leftEntry the leftEntry to set
	 */
	public void setLeftEntry(D leftEntry) {
		this.leftEntry = leftEntry;
	}

	/**
	 * @return the rightEntry
	 */
	public D getRightEntry() {
		return rightEntry;
	}

	/**
	 * @param rightEntry the rightEntry to set
	 */
	public void setRightEntry(D rightEntry) {
		this.rightEntry = rightEntry;
	}
		
	
}